import { JSX } from 'react'
import { Button } from 'antd'
import styles from './index.module.scss'

interface Props {
  tip: string
  onCancel: () => void
  onConfirm: () => void
}

export function CommonConfirm(props: Props): JSX.Element {
  return (
    <div className={styles['common-confirm']}>
      <div>{props.tip}</div>
      <div className={styles['btn-wrap']}>
        <Button onClick={props.onCancel}>取消</Button>
        <Button className={styles['confirm-btn']} type="primary" onClick={props.onConfirm}>
          确认
        </Button>
      </div>
    </div>
  )
}
